<template>
  <el-input-number v-model="payId" controls-position="right" size="large"/>
  <el-button @click="goToPay">付款</el-button>
  <div ref="payForm"></div>
</template>

<script setup>
import {ref} from "vue";
import request from "@/axios/axiosUtils.js";
const payId=ref(131);
const payForm = ref(null);
const goToPay = () => {
  request({
    url: '/pay/alipay?orderId='+payId.value,
    method: 'get',
  }).then((res)=>{
    payForm.value.innerHTML = res;
    console.log(payForm.value);
    window.document.forms[0].submit()
  })

}
</script>

<style scoped>

</style>